Introduced in 2023.1
| Method | UpdateAccount |
The request body is of type UpdateAccount.
| Name | Description | Data Type |
|---|---|---|
| AccountInfo | An object containing the standard Account data fields to update. | xml:string |
| Options | An object containing any additonal Account options related to the update. | xml:string |
// Example 1: Update account information MakeAJAXCall("Visitor.UpdateAccount", { AccountInfo: { Email: 'sblack@bikesblades.com', FirstName: 'Susan', LastName: 'Brown-Black', CompanyName: 'Bikes and Blades', PrimaryPhone: '(555) 555-1212', PrimaryPhoneExt: '123', AlternatePhone: '(555) 555-1213', AlternatePhoneExt '134', EmailMarketingOptInStatus: true, MobileNumber: '15555551234', SMSOptInStatus: true } }, console.log); // Example 2: Update partial account information MakeAJAXCall("Visitor.UpdateAccount", { AccountInfo: { MobileNumber: '15555551234', SMSOptInStatus: true } }, console.log);
The response body is of type UpdateAccountResponse.
| Name | Description | Data Type |
|---|---|---|
| UpdateAccountResult | A string value containing a JSON object.
{
"Data": {
"Name": "Bayside Bikes",
"CustomerNumber": "000000000000001",
"Telephone": "206-555-4562",
"Contact": "Karen Saunders",
"Fax": null,
"CustomeronHold": false,
"FreeShipping": false,
"CreateDate": "2017-09-20T14:27:45.057",
"CurrencyCode": "$",
"PunchOutInvoice": "OFF",
"PunchOutInvoiceUrl": "",
"PunchOutLoginReturnUrl": "",
"PunchOutOrderAddressIDIsMultiShipCode": false,
"InvoiceXmlXsltFile": "",
"CustomerClass": "Wholesaler",
"Email": "sbrown@bikesblades.com",
"FirstName": "Susan",
"LastName": "Brown",
"CompanyName": "",
"PrimaryPhone": "",
"PrimaryPhoneExt": "",
"AlternatePhone": "",
"AlternatePhoneExt": "",
"PrimaryPhoneonFile": "",
"PrimaryContactonFile": "",
"OnFile": true,
"Approved": true,
"LastLoginDate": "2022-10-04T16:57:58.827",
"EmailMarketingOptInStatus": false,
"EmailMarketingOptInStatusChangeDate": "2022-10-04T17:13:18.95",
"IsLocked": false,
"NumLoginAttempts": 0,
"UnlockDateTime": null,
"MobilePhone": null,
"PreferredWarehouse": null,
"MobileNumber": "15555551212",
"SMSMultiFactorOptIn": true,
"SMSVerified": false,
"EnableWarehouseSelection": true,
"DefaultApproved": true,
"UserStatus": "B2B",
"HasSavedCarts": true,
"CartItemCount": 0,
"BillingAddress": {
"Address1": "P O Box 8",
"Address2": "2001 Ocean Avenue",
"Address3": "",
"FirstName": "Bayside Bikes",
"LastName": "",
"City": "Santa Monica",
"State": "LA County",
"Zip": "A2B 4C6",
"Country": "CA",
"Phone": "206-555-4562"
},
"ShippingAddress": {
"Address1": "3 Beach Road",
"Address2": "Bayside North",
"Address3": "",
"FirstName": "Bayside Bikes",
"LastName": "",
"City": "Seattle",
"State": "WA",
"Zip": "98101",
"Country": "United States",
"Phone": "206-555-4562"
}
},
"Result": {
"Success": true,
"Message": "The account was updated successfully. The account profile was retrieved successfully.",
"ElapsedTime": "319 ms"
}
}
| xml:string |